function New-AzureSQLServer {
    Param (
        [Parameter(Mandatory = $true)][string][ValidateScript({ $null -ne $_ })]$ResourceGroup,
        [Parameter(Mandatory = $true)][string][ValidateScript({ $null -ne $_ })]$Location,
        [Parameter(Mandatory = $true)][LSInsightServer][ValidateScript({ (!([string]::IsNullOrWhiteSpace($_.Name))) -and ($null -ne $_.Credential) })]$Server
    )
    
    # Create new Azure SQL server.
    $params = @{
        ResourceGroupName = $ResourceGroup
        Location = $Location
        ServerName = $Server.Name
        ServerVersion = "12.0"
        SqlAdministratorCredentials = $Server.Credential
    }

    return New-AzSqlServer @params
}